<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<!--组件实例对象-->
<div id="app">
<cpn></cpn>
  <cpn></cpn>
  <cpn></cpn>
</div>
<template id="cpn">
  <div>
    <h2>数量是：{{count}}</h2>
    <button v-on:click="noAdd">-</button>
    <button v-on:click="add">+</button>
  </div>
</template>
  <script src="../../../project_practice/lunbotu/vue.js"></script>
  <script>
    Vue.component('cpn',{
      template:'#cpn',
      data(){
        return{
          count:0
        }
      },
      methods:{
        add(){
          this.count++
        },
        noAdd(){
          this.count--
        }
      }
    })

    const app = new Vue({
      el:'#app',
      data:{
        message:"你好啊！！"
      }
    })
  </script>
</body>
</html>